package vip.fastgo.retroid.android.gamebox.view.activity

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import androidx.viewbinding.ViewBinding

open abstract class BaseActivity<D: ViewBinding>: AppCompatActivity() {

    protected lateinit var binding: D

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        binding = initBinding()
        setContentView(binding.root)
        initView(savedInstanceState)
    }

    abstract fun initBinding(): D

    abstract fun initView(savedInstanceState: Bundle?)
}